package com.zgz.underwrite.model;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * 机构
 * @author zgz
 *
 */

@Entity
@Table(name="department")
public class Department implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -70253633532652900L;

	@Id
	@GeneratedValue(generator = "paymentableGenerator")     
	@GenericGenerator(name = "paymentableGenerator", strategy = "assigned")   
	private String SDeptNo;
	private String SDeptName;
	
	@OneToMany(cascade=CascadeType.ALL,mappedBy="dept")
	private Set<Employee> employees;
	
	public String getSDeptName() {
		return SDeptName;
	}
	public void setSDeptName(String deptName) {
		SDeptName = deptName;
	}
	public void setSDeptNo(String sDeptNo) {
		SDeptNo = sDeptNo;
	}
	public String getSDeptNo() {
		return SDeptNo;
	}
	public void setEmployees(Set<Employee> employees) {
		this.employees = employees;
	}
	public Set<Employee> getEmployees() {
		return employees;
	}
	
}
